#ifndef STRING_BUFFER_H
#define STRING_BUFFER_H

#include <unicode/ustring.h>

void buffer_append_char(UChar **buffer, UChar string, size_t *buffer_size);
void buffer_append(UChar **buffer, UChar *string, size_t *buffer_size);

typedef struct _string_buffer
{
  UChar *string;
  // Space Occupied
  size_t length;
  // Space Available
  size_t size;
} string_buffer_t;

string_buffer_t *make_string_buffer(size_t size);
void string_buffer_append(string_buffer_t *buffer, UChar *string);
void string_buffer_append_n(string_buffer_t *buffer, UChar *string, size_t n);
void string_buffer_append_character(string_buffer_t *buffer, UChar character);
UChar *string_buffer_finalize(string_buffer_t *buffer);

#endif // STRING_BUFFER_H
